<?php 

class Model_map extends CI_Model {
    
    function __construct() {
        parent::__construct();
    }

    function getMap($id) {
        $collection = $this->mongo_db->db->selectCollection('maps');
        $map = $collection->find(array("_id" => $id));
        return $map;	
    }

    function getMaps() {
    	$collection = $this->mongo_db->db->selectCollection('maps');
        $map = $collection->find();
        return $map;
    }

    function insertMap($map) {
        $collection = $this->mongo_db->db->selectCollection('maps');
        $collection->insert($map);
    }

}

?>